#include <stdio.h>

int main ()
{
   FILE *fp;
   int c;
   unsigned int size;
   
   fp = fopen("app.bin","rb");
   if(fp == NULL)
   {
    printf("file is not exit!\n");
    return -1;
   }

   fseek(fp,0L,SEEK_END);  
   size = ftell(fp);  
   printf("bin size:%d %08x",size,size);
   fseek(fp,0L,SEEK_SET);  
   while(1)
   {
      c = fgetc(fp);
      if( feof(fp) )
      { 
          break ;
      }
      printf("%02x ", (unsigned char)c);
   }
   fclose(fp);
   return(0);
}